import java.awt.*;
import java.util.Scanner;

public class Test_2 {
    public static void main(String[] args) {
       //杨辉三角
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();

        int[][] ints = new int[n][n];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                ints[i][j] = 1;
            }
        }
        //1
        //1 1
        //1 2 1
        //1 3 3 1
        for (int i = 2; i < n; i++) {
            for (int j = 1; j < i; j++) {
                ints[i][j] = ints[i-1][j-1] + ints[i-1][j];
            }
        }
        for (int i = 0; i < n; i++) {
            for (int j = 0; j <= i; j++) {
                System.out.print(ints[i][j]+" ");
            }
            System.out.println();
        }
    }
}
